
import { IsString, IsInt,Length, IsEmpty } from 'class-validator';

export class CreateDemoDto {
    @IsString()
    @IsEmpty({
        message:"不能为空"
    })
    @Length(2,10,{
        message:"长度在2-10之间"
    })
    name:string
    @IsInt()
    age:number
}
